import axiosService from '../http/axiosService.js'


export const doGetRoleList = (pageNo,pageSize) => {
  return axiosService({
    url: '/backend/getRoleList',
    method: 'post',
    data: {
      page_no: pageNo,
      page_size: pageSize
    }
  })
}
export const doAddRole = (roleName) => {
  return axiosService({
    url: '/backend/createRole',
    method: 'post',
    data: {
      role_name: roleName
    }
  })
}
export const doGetAccessByRole = (roleId) => {
  return axiosService({
    url: '/backend/getAccessRole',
    method: 'post',
    data: {
      role_id: roleId
    }
  })
}
export const doEditAccessByRole = (roleId, accessUri) => {
  return axiosService({
    url: '/backend/editAccessRole',
    method: 'post',
    data: {
      role_id: roleId,
      access_uri: accessUri
    }
  })
}
export const doGetAccessList = () => {
  return axiosService({
    url: '/backend/accessList',
    method: 'post'
  })
}
